package com.mt.mall.service.User;

import com.mt.common.core.web.base.PageDTO;
import com.mt.common.core.web.base.PageResultDTO;
import com.mt.mall.entity.User.ShippingAddress;

import java.util.List;

public interface ShippingAddressService {
    /**
     * 根据分页参数查询收获地址集合
     *
     * @param pageDTO 分页条件
     */
    public PageResultDTO findShippingAddresss(PageDTO pageDTO);

    /**
     * 查询全部收获地址集合
     *
     */
    public List<ShippingAddress> findAllShippingAddresss();

    /**
     * 根据名称查询收获地址集合(只提取ID 和 Name)
     *
     * @param shippingAddressName 名称
     */
    public List<ShippingAddress> findShippingAddresssWithIdNameByName(String shippingAddressName);

    /**
     * 查询所有收获地址集合(只提取ID 和 Name)
     *
     */
    public List<ShippingAddress> findAllShippingAddresssWithIdName();

    /**
     * 根据ID查询指定的收获地址(只提取ID 和 Name)
     *
     * @param shippingAddressId Id
     */
    public ShippingAddress findShippingAddresssWithIdNameById(Long shippingAddressId);

    /**
     * 根据ID查询指定的收获地址
     *
     * @param shippingAddressId Id
     */
    public ShippingAddress findShippingAddress(Long shippingAddressId);

    /**
     * 根据ID查询指定的收获地址(包含外键)
     *
     * @param shippingAddressId Id
     */
    public ShippingAddress findShippingAddressWithForeignName(Long shippingAddressId);

    /**
     * 新增收获地址
     *
     * @param shippingAddress 实体对象
     */
    public ShippingAddress saveShippingAddress(ShippingAddress shippingAddress);

    /**
     * 更新收获地址
     *
     * @param shippingAddress 实体对象
     */
    public ShippingAddress updateShippingAddress(ShippingAddress shippingAddress);

    /**
     * 根据ID删除收获地址
     *
     * @param shippingAddressId ID
     */
    public void deleteShippingAddress(Long shippingAddressId);

    List<ShippingAddress> findShippingAddressByUserId(Long userId);

    void setDefaultAddress(ShippingAddress shippingAddress);

    ShippingAddress getDefaultAddress();
}
